import request from "../axios.js";
import { baseUrl } from "@/config/env";

// 根据条件获取所有会议室
export function getCmsRoomByStatus(params) {
  return request({
    url: baseUrl + "/cmsRoom/getCmsRoomByStatus",
    method: "get",
    params,
  });
}

// 申请会议
export function addCmsMeeting(data) {
  return request({
    url: baseUrl + "/cmsMeeting/addCmsMeeting",
    method: "post",
    data,
  });
}

// 通过会议id修改会议
export function updateCmsMeetingById(data) {
  return request({
    url: baseUrl + "/cmsMeeting/updateCmsMeetingById",
    method: "put",
    data,
  });
}

// 通过会议id批量删除会议
export function deleteCmsMeetingById(data) {
  return request({
    url: baseUrl + "/cmsMeeting/deleteCmsMeetingById",
    method: "delete",
    data,
  });
}

// 获取部门
export function getDepartmentList() {
  return request({
    url: baseUrl + "/cmsDepartment/departmentList",
    method: "get",
  });
}

// 根据部门 id 获取用户
export function getUserListByDepartment(params) {
  return request({
    url: baseUrl + "/SysUser/getUserListByDepartment",
    method: "get",
    params,
  });
}

// 获取通过部门分类的用户列表
export function getDepartmentUserList(params) {
  return request({
    url: baseUrl + "/cmsDepartment/getDepartmentUserList",
    method: "get",
    params,
  });
}
